package com.example.cr.insect.request;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

public class PestOccurrenceRequest {
    /**
     * id
     */
    private Long id;

    /**
     * 害虫ID
     */
    @NotNull(message = "【害虫ID】不能为空")
    private Long pestId;

    /**
     * 地点ID
     */
    @NotNull(message = "【地点ID】不能为空")
    private Long locationId;

    /**
     * 出没时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @NotNull(message = "【出没时间】不能为空")
    private Date occurrenceTime;

    /**
     * 数量
     */
    @NotNull(message = "【数量】不能为空")
    private Long quantity;

    /**
     * 危害程度
     */
    @NotBlank(message = "【危害程度】不能为空")
    @Size(max = 10)
    private String damageLevel;

    /**
     * 天气情况
     */
    @Size(max = 20)
    private String weather;

    /**
     * 温度(℃)
     */
    private BigDecimal temperature;

    /**
     * 湿度(%)
     */
    private BigDecimal humidity;

    /**
     * 报告人ID
     */
    @NotNull(message = "【报告人ID】不能为空")
    private Long reporterId;

    /**
     * 状态
     */
    @NotBlank(message = "【状态】不能为空")
    @Size(max = 10)
    private String status;

    /**
     * 备注
     */
    @Size(max = 255)
    private String notes;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createdAt;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updatedAt;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPestId() {
        return pestId;
    }

    public void setPestId(Long pestId) {
        this.pestId = pestId;
    }

    public Long getLocationId() {
        return locationId;
    }

    public void setLocationId(Long locationId) {
        this.locationId = locationId;
    }

    public Date getOccurrenceTime() {
        return occurrenceTime;
    }

    public void setOccurrenceTime(Date occurrenceTime) {
        this.occurrenceTime = occurrenceTime;
    }

    public Long getQuantity() {
        return quantity;
    }

    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }

    public String getDamageLevel() {
        return damageLevel;
    }

    public void setDamageLevel(String damageLevel) {
        this.damageLevel = damageLevel;
    }

    public String getWeather() {
        return weather;
    }

    public void setWeather(String weather) {
        this.weather = weather;
    }

    public BigDecimal getTemperature() {
        return temperature;
    }

    public void setTemperature(BigDecimal temperature) {
        this.temperature = temperature;
    }

    public BigDecimal getHumidity() {
        return humidity;
    }

    public void setHumidity(BigDecimal humidity) {
        this.humidity = humidity;
    }

    public Long getReporterId() {
        return reporterId;
    }

    public void setReporterId(Long reporterId) {
        this.reporterId = reporterId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", pestId=").append(pestId);
        sb.append(", locationId=").append(locationId);
        sb.append(", occurrenceTime=").append(occurrenceTime);
        sb.append(", quantity=").append(quantity);
        sb.append(", damageLevel=").append(damageLevel);
        sb.append(", weather=").append(weather);
        sb.append(", temperature=").append(temperature);
        sb.append(", humidity=").append(humidity);
        sb.append(", reporterId=").append(reporterId);
        sb.append(", status=").append(status);
        sb.append(", notes=").append(notes);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append("]");
        return sb.toString();
    }
}